package decorator;

import decorator.coffee.ShortBlack;
import decorator.decorator.Chocolate;
import decorator.decorator.Milk;

/**
 * @author : DuJiabao
 * @Date : 2021/3/3 14:44
 * @Project : design-pattern
 * @File : null.java
 * @Desc :
 */
public class Client {
  public static void main(String[] args) {
    Drink shortBlack = new ShortBlack();
    System.out.println(shortBlack.getDescription());
    System.out.println(shortBlack.cost());

    Chocolate chocolate = new Chocolate(shortBlack);
    System.out.println(chocolate.getDescription());
    System.out.println(chocolate.cost());

    Milk milk = new Milk(chocolate);
    System.out.println(milk.getDescription());
    System.out.println(milk.cost());

    Chocolate chocolate1 = new Chocolate(milk);
    System.out.println(chocolate1.getDescription());
    System.out.println(chocolate1.cost());

  }
}
